package net.e4net.watrix.example.action.hello;

import java.io.IOException;


import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.e4net.watrix.ActionResponse;
import net.e4net.watrix.ResponseData;
import net.e4net.watrix.WatrixContext;
import net.e4net.watrix.WatrixException;
import net.e4net.watrix.common.hao.RequestParser;
import net.e4net.watrix.common.tao.TaoResult;
import net.e4net.watrix.runtime.AbstractAction;

public class HiActn extends AbstractAction {

    @SuppressWarnings("unchecked")
	public ActionResponse execute(WatrixContext context,
            HttpServletRequest request, HttpServletResponse response)
            throws IOException, ServletException, WatrixException {
      	
    	 RequestParser parser = context.getRequestParser("default",request,response);
    	 
    	 String yourname = parser.getParameter("yourname","");
    	 String yourname1 = parser.getParameter("yourname1","");
         String yourname2 = parser.getParameter("yourname2","");

         ResponseData resData = super.getResponseData(request);
         
         resData.put("yourname", yourname);
         resData.put("yourname1", yourname1);
         resData.put("yourname2", yourname2);


         return super.getActionResponse(context);
     }
 }
    	
    
/*    	
    	ResponseData resData = super.getResponseData(request);
        RequestParser parser = context.getRequestParser("default",request,response);
       
        String yourname = parser.getParameter("name","");
        String test = parser.getParameter("test","");
        String test2 = parser.getParameter("test2","");
        String test3 = "test3";
        
//      System.out.println(yourname);
        resData.put("name", yourname);
        resData.put("test", test);
        resData.put("test2", test2);
        resData.put("test3", test3);
  
        return super.getActionResponse(context);
    }
}
*/
    	
